//package cn.itcast.mq.annotation.listener;
//
//import cn.itcast.mq.annotation.config.AnnotationRabbitConfig;
//import org.springframework.amqp.core.ExchangeTypes;
//import org.springframework.amqp.rabbit.annotation.*;
//import org.springframework.stereotype.Component;
//
//@Component
//public class AnnotationRabbitListener {
//
//    /**
//     * 路由模型
//     */
//    @RabbitListener(bindings = @QueueBinding(
//            value = @Queue(name = AnnotationRabbitConfig.DIRECT_QUEUE1, durable = "true"
////                    , arguments = @Argument(name = "x-queue-mode", value = "lazy")
//            ),
//            exchange = @Exchange(name = AnnotationRabbitConfig.DIRECT_EXCHANGE, type = ExchangeTypes.DIRECT),
//            key = {AnnotationRabbitConfig.DIRECT_ROUTEKEY_RED}
//    ))
//    public void directQueue1(String message) {
//        System.out.println("路由消息模型的消费者1，消费消息：" + message);
//    }
//
//    @RabbitListener(bindings = @QueueBinding(
//            value = @Queue(name = AnnotationRabbitConfig.DIRECT_QUEUE2, durable = "true"),
//            exchange = @Exchange(name = AnnotationRabbitConfig.DIRECT_EXCHANGE, type = ExchangeTypes.DIRECT),
//            key = {AnnotationRabbitConfig.DIRECT_ROUTEKEY_BLUE}
//    ))
//    public void directQueue2(String message) {
//        System.out.println("路由消息模型的消费者2，消费消息：" + message);
//    }
//
//}
